#pragma once
#include<stdio.h>
#define SIZE 4096
#define NONE_FLUSH (1<<1)
#define LINE_FLUSH (1<<2)
#define FULL_FLUSH (1<<3)
//自定义封装FILE结构体
typedef struct _myFILE
{
    int fileno;
    //char inbuffer[SIZE]; //输入缓冲区
    char outbuffer[SIZE];  //输出缓冲区
    int pos;//当前缓冲区的写入位置
    int cap;//当前缓冲区的容量大小
    int flush_mode;
}myFILE;

//打开接口
myFILE* myfopen(const char* pathname,const char* mods);
//写入接口
int my_fwrite(myFILE*fp,const char*s,int size);
//关闭接口
void myfclose(myFILE*fp);
//刷新接口
void my_fflush(myFILE*fp);
//测试接口
void DebugPrint(myFILE*fp);
